#include "ifactory.h"
#include"concretefactory.h"
IFactory::IFactory()
{

}

IFactory *IFactory::CreateFactory(IFactory::FACTORY_TYPE factory)
{
    IFactory *pFactory=nullptr;
    switch (factory) {
    case IFactory::FACTORY_A:
        pFactory=new FactoryA();
        break;
    case IFactory::FACTORY_B:
        pFactory=new FactoryB();

    break;
    case IFactory::FACTORY_C:
        pFactory=new FactoryC();
        break;
    }
    return pFactory;
}
